package com.example.saveqq;

import android.content.Context;

import java.io.FileOutputStream;
import java.io.IOException;

public class FileSaveQQ {
    public static void saveUserInfo(Context context, String account, String password){
        FileOutputStream fos=null;
        try{
            fos=context.openFileOutput("data.txt",Context.MODE_PRIVATE);
            fos.write((account+"-"+password).getBytes());
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            try{
                if(fos!=null){
                    fos.close();
                }
            }catch (IOException e){
                e.printStackTrace();
            }

        }
    }
}
